<div id="adminPage">
   <h2>Add New Park</h2>
   <br/>
   <img class="search" src="../images/addpark.png" alt="Add Park"/>
   <br/>
   <br/>
   <form action = "savepark.php" method = "post" enctype = "multipart/form-data">
   	<table border = 0>
   		<tr class="field">
   			<td>Park picture: <input name = "pic" type = "file"></td>
   			<td>
   				{if $errorspic}
   					{$errorspic}
   				{/if}
   			</td>
   		</tr>
		
   		<tr class="field">
   			<td><label>Park name: </label><input type = "text" name = "name"
   				{if $name} 
   					value = "{$name}"
   				{/if}
   			/></td>
   			<td>
   				{if $errorsname}
   					{$errorsname}
   				{/if}
   			</td>
   		</tr>
		
   		<tr class="field">
   			<td><label>Address: </label><input type = "text" name = "address" 
   				{if $address} 
   					value = "{$address}"
   				{/if}
   			/></td>
   			<td>
   				{if $errorsaddress}
   					{$errorsaddress}
   				{/if}			
   			</td>
   		</tr>
		
   		<tr class="field">
   			<td><label>Park type: </label><input type = "text" name = "type"
   				{if $type} 
   					value = "{$type}"
   				{/if}
   			/></td>
   			<td>
   				{if $errorstype}
   					{$errorstype}
   				{/if}
   			</td>
   		</tr>
		
   		<tr class="field">
   			<td>
   			<label>Suburb: </label>
   			<select name = "suburb">
   				{if $failPC}
   					<option>{$failPC}</option>
   				{else}
   					{section name = i loop = $optionsPC}
   						<option value = "{$optionsPC[i].id}">{$optionsPC[i].suburb} ({$optionsPC[i].postcode})</option>
   					{/section}
   				{/if}
   			</select>
   			</td>
   		</tr>
	</table>
	<br/>
	
	<table>
   		<tr class="field">
   			<td>Equipment</td>
   			<td>Quantity</td>
   		</tr>
		
   		{if $failEq}
   			<tr><td>Failed to load Park Equipment</td></tr>
   		{else}
   			{section name = i loop = $parkEq}
   				<tr class="field">
   					<td>
   						<input type = "checkbox" name = "park_equip[]" value = "{$parkEq[i].id}" 
   						{if $parkEq[i].checked}
   							checked
   						{/if}
   						/>
   						{$parkEq[i].name}
   					</td>
   					<td><input type = "text" size = "2" name = "{$parkEq[i].id}" 
   						{if $form[i]} 
   							value = "{$form[i]}"
   						{/if}/>
   					</td>
   					<td>
   						{if $errors[i]}
   							{$errors[i]}
   						{/if}
   					</td>
   				</tr>
   			{/section}
   		{/if}
   	</table>
	<br/>
   	<input type = "submit" name = "submit" value = "Save Park"/>
   	<input type = "submit" name = "submit" value = "Cancel"/>
   </form>
</div>